{  Statement: http://acmp.ru/?main=task&id_task=271
   Verdict: Accepted
}
uses
    SysUtils, Math;

var
    n,cur,a,b,t:int64;

begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
a := 1;
b := 1;
cur := 2;
while b < n do begin
    inc(cur);
    t := b;
    inc(b, a);
    a := t;
end;
if b > n then write(0) else begin
    writeln(1);
    writeln(cur);
end;
end.